package com.lst.api.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.lst.tools.mybatis.entity.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 文件上传记录表
 *
 * @author Allen
 * @date 2019-09-30 15:33:59
 * @version: V1.0
 */
@Data
@NoArgsConstructor
@TableName(value = "lst_file_upload")
@ApiModel(value = "文件上传记录表")
public class FileUpload extends BaseModel {

    public static final String SOURCE_USER_ID = "source_user_id";
    public static final String BIZE_TYPE = "bize_type";
    public static final String ORIGIN_NAME = "origin_name";
    public static final String NEW_NAME = "new_name";
    public static final String PATH = "path";
    public static final String FORMAT = "format";
    public static final String SIZE = "size";

    @ApiModelProperty(name = "sourceUserId", value = "用户id", dataType = "Long")
    @TableField(value = SOURCE_USER_ID)
    private Long sourceUserId;
    @ApiModelProperty(name = "bizeType", value = "业务类型，例如上传头像时传'avatar', 相册时传'album'，如此类推，跟前端协定好", dataType = "String")
    @TableField(value = BIZE_TYPE)
    private String bizeType;
    @ApiModelProperty(name = "originName", value = "原文件名", dataType = "String")
    @TableField(value = ORIGIN_NAME)
    private String originName;
    @ApiModelProperty(name = "newName", value = "后台定义文件名", dataType = "String")
    @TableField(value = NEW_NAME)
    private String newName;
    @ApiModelProperty(name = "path", value = "保存路径,相对路径", dataType = "String")
    @TableField(value = PATH)
    private String path;
    @ApiModelProperty(name = "format", value = "文件类型", dataType = "String")
    @TableField(value = FORMAT)
    private String format;
    @ApiModelProperty(name = "size", value = "文件大小，单位KB", dataType = "Long")
    @TableField(value = SIZE)
    private Long size;
}